package com.cet.designapplication.pay.strategy.context;

import com.cet.designapplication.pay.strategy.PayStrategyInterface;
import com.cet.designapplication.pojo.Order;

/**
 * @author NSOC
 */
public class PayContext extends AbstractPayContext{

    private final PayStrategyInterface payStrategy;

    public PayContext(PayStrategyInterface payStrategy) {
        this.payStrategy = payStrategy;
    }

    @Override
    public String execute(Order order) {
        return payStrategy.pay(order);
    }
}
